<template>
    <div class="Viewopint-box">
        <div class="opint-box">
            
                <van-nav-bar title="标题" left-text="返回" left-arrow right-text="发布"  @click-left="onClickLeft"
                @click-right="onClickRight">
                <template #title>
                    <div>回复 {{name}}</div>

                </template>
                </van-nav-bar>
            

        </div>
        <div class="opint-main">
            <textarea name="" id="text-box" placeholder="友善的评论是交流的起点..."></textarea>
        </div>
    </div>
</template>

<script>
    import { Toast } from 'vant';




    export default {
        name:'Shortanswer',
        data(){
            return{
                id:'',
                name:'',
            }
        },

        components:{
            Toast,
        },

        created(){
            this.id = this.$route.query.id;
            this.name= this.$route.query.name;
          
            
        },

        methods:{
        onClickLeft() {
            this.$router.go(-1);
        },
        onClickRight() {
            Toast('回复成功');
            this.$router.go(-1);
        },

        },
       
        

    }
</script>

<style lang="less" scoped>

    .opint-box{
        height: 46px;
        margin-bottom: 15px;
    }


    .opint-main{
        width: 100%;
       
        display: flex;
        justify-content: center;
    }

    textarea{
        
        width: 90%;
       border: none;
       outline: none;
       height: calc(95vh - 46px);
        line-height: 20px;
        resize: none;
       font-size: 16px;
        letter-spacing:1px;
        
    }
    
</style>